/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUIComponents.dailyComponents;

import MainClasses.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;

/**
 *
 * @author andrewcutler
 */
public class DailyHeaderPanel extends JPanel {
    
    public DailyHeaderPanel()
    {
        this.setLayout(new GridLayout(1,3));
        reset();
    }
    
    
    private class InfoPanel extends JPanel
    {
        public InfoPanel()
        {
            this.setBackground(new Color(0,0,0,75));
            this.setBorder(BorderFactory.createLineBorder(Color.black));
            this.add(new JLabel("Classes"));
        }
    }
    
    private class HeaderDayPanel extends JPanel
    {
        public HeaderDayPanel(int i)
        {
            this.setBorder(BorderFactory.createLineBorder(Color.BLACK));
            this.add(new JLabel(main.getCurrentDate(i).toString(MyDate.FORMAT_1, "-")));
        }
    }
    
    
    public void reset()
    {
        this.removeAll();
        
        this.add(new InfoPanel());
        this.add(new HeaderDayPanel(0));
        this.add(new HeaderDayPanel(1));
    }
}
